package com.chw.common.kuyu;
/*   配置类    相当于配置文件 */


import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport;


@Configuration // 声明是一个配置类
public class KuayuConfigInterceptor extends WebMvcConfigurationSupport {
    @Autowired
    private KuYu kuYu;


    @Override
    protected void addInterceptors(InterceptorRegistry registry) {
             /*  拦截器 */
            registry.addInterceptor(kuYu).addPathPatterns("/**");/*.excludePathPatterns("user/**")*/
            registry.addInterceptor(new AuthInterceptor()).addPathPatterns("/auth*/**");
    }
}
